#include "GameObject.h"
HRESULT GameObject::Load()
{
	return true;
}

bool GameObject::Collision(RECT rect)
{
	if(((rect.right > m_volume.left) && (m_volume.right > rect.left))
		&& ((rect.bottom > m_volume.top) && (m_volume.bottom > rect.top)))
	{
		return 1;
	}
	else
	{
		return 0;
	}
}

void GameObject::Unload()
{
	if( m_pVB!= NULL )
		m_pVB->Release();

	if(m_Texture != NULL)
		m_Texture->Release();
}
Vec2f GameObject::GetPos()
{
	return m_Pos;
}
void GameObject::SetPos(Vec2f p)
{
	m_Pos=p;
}

Vec2f GameObject::GetVel()
{
	return m_Vel;
}
void GameObject::SetVel(Vec2f v)
{
	m_Vel=v;
}

Vec2f GameObject::GetAcc()
{
	return m_Acc;
}
void GameObject::SetAcc(Vec2f a)
{
	m_Acc=a;
}

Vec2f GameObject::GetSize()
{
	return m_Size;
}
void GameObject::SetSize(Vec2f s)
{
	m_Size=s;
}

void GameObject::SetVB(LPDIRECT3DVERTEXBUFFER9 t)
{
	m_pVB = t;
}

RECT GameObject::GetVolume()
{
	return m_volume;
}

HRESULT GameObject::Update()
{
	return true;
}
void GameObject::Draw()
{

}